package edu.fzu.eduservice.controller;

import edu.fzu.commonutils.ResponseResult;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/eduservice/user")
public class EduLoginController {

    @PostMapping("login")
    public ResponseResult login(){
        return ResponseResult.ok().add("token", "admin");
    }

    @GetMapping("info")
    public ResponseResult info(){
        return ResponseResult.ok().add("roles", "[admin]")
                .add("name", "admin")
                .add("avatar", "https://edu-guli-0514.oss-cn-beijing.aliyuncs.com/2021/01/03/2664f7ed351d455e81010abde70d150e2.jpg");
    }
}

